
@extends('admin.master')

@section('title', '设备记录')

@section('title_top')
    @parent
    <div class="title_top">设备记录</div>
@stop

@section('equip_query')
<div class="equip_num">
	<p>用户编号</p>
	<p class="write_box"></p>
	<!-- 弹出下拉框 -->
	<div class="userIds">
		@foreach($deviceInfos->first()->device->wxUsers as $wxUser)
		<a>{{ $wxUser->open_id }}</a>
		@endforeach
	</div>
</div>
<div class="equip_status">
	<p>姓名</p>
	<p class="name_txt1"></p>				
</div>
<div class="telephe">
	<p>电话</p>
	<p class="tel_txt1"></p>
</div>
@stop

@section('userinfo_tab')
<table cellpadding="0" cellspacing="0" class="equip_table">
	<thead>
		<tr>
			<td>设备编号</td>
			<td>RO滤芯使用时间</td>
			<td>普通滤芯使用时间</td>
			<td>单日制水量</td>
			<td>总制水量</td>
			<td>设备状态</td>
			<td>记录时间</td>
		</th>
	</thead>
	<tbody>
		@foreach($deviceInfos as $deviceInfo)
			@if($deviceInfo->dec_status == App\Models\DeviceInfo::HYDROPENIA)
		<tr class="less_bg">
			@elseif($deviceInfo->dec_status == App\Models\DeviceInfo::OVERHAUL)
		<tr class="service_bg">
			@else
		<tr >
			@endif
			<td>{{ $deviceInfo->device->code }}</td>
			<td>{{ $deviceInfo->filter_cnt2 }} min</td>
			<td>{{ $deviceInfo->filter_cnt1 }} min</td>
			<td>{{ $deviceInfo->daily_water_consumption }} L</td>
			<td>{{ $deviceInfo->water_cnt }} L</td>
			<td>{{ $deviceInfo->device_status_description }}</td>
			<td>{{ $deviceInfo->created_at }}</td>
		</tr>
		@endforeach
	</tbody>
</table>
@stop

@section('page_num')
    <ul class="pagination pagination-lg"> 
        {!! $deviceInfos->appends(['deviceId' => $deviceInfo->device_id])->render() !!}
    </ul>
@stop


